using Microsoft.VisualStudio.Modeling;
using System.Collections.Generic;

namespace Dslfactory.wcfLanguage
{
 public partial class DataContract
 {
  public override IEnumerable<FieldOrProperty> Members 
  {
   get
   {
    foreach (FieldOrProperty member in DataMembers)
     yield return member;
   }
  }

  internal override FieldOrProperty CreateMember(string fullTypeName)
  {
   return new DataMember(Store, new PropertyAssignment(FieldOrProperty.MemberFullTypeNameDomainPropertyId, fullTypeName));
  }


  /// <summary>
  /// Label for the textual decorator
  /// </summary>
  /// <returns></returns>
  internal string GetLabelValue()
  {
   if (IsDataContract)
    return "Data Contract";
   else
    return "Class";
  }
 }
}
